<div class="text-center"><img src="{php echo tomedia('headimg_'.$_W['account']['acid'].'.jpg')}?time={php echo time()}" class="head-logo"></div>
<div class="text-center account-name">{$_W['account']['name']}</div>
<div class="text-center">
	{if $_W['account']['level'] == 1 || $_W['account']['level'] == 3}
		<span class="label label-primary">订阅号</span>{if $_W['account']['level'] == 3}<span class="label label-primary">已认证</span>{/if}
	{/if}
	{if $_W['account']['level'] == 2 || $_W['account']['level'] == 4}
		<span class="label label-primary">服务号</span> {if $_W['account']['level'] == 4}<span class="label label-primary">已认证</span>{/if}
	{/if}
	{if $_W['uniaccount']['isconnect'] == 0}
		<span class="label label-danger" data-toggle="popover">未接入</span>
		<script>
			$(function(){
				var url = "{url 'account/post' array('uniacid' => $_W['account']['uniacid'], 'acid' => $_W['acid'])}";
				$('[data-toggle="popover"]').popover({
					trigger: 'manual',
					html: true,
					placement: 'bottom',
					content: '<i class="wi wi-warning-sign"></i>未接入微信公众号' +
							'<a href="' +
							url +
							'">立即接入</a>'
				}).on("mouseenter", function() {
					var _this = this;
					$(this).popover("show");
					$(this).siblings(".popover").on("mouseleave", function() {
						$(_this).popover('hide');
					});
				}).on("mouseleave", function() {
					var _this = this;
					setTimeout(function() {
						if(!$(".popover:hover").length) {
							$(_this).popover("hide")
						}
					}, 100);
				});
			});
		</script>
	{/if}
</div>
<div class="text-center operate">
	<a href="{php echo url('utility/emulator');}" target="_blank"><i class="wi wi-iphone" data-toggle="tooltip" data-placement="bottom" title="模拟测试"></i></a>
	{if uni_permission($_W['uid'], $_W['uniacid']) != ACCOUNT_MANAGE_NAME_OPERATOR}
	<a href="{php echo url('account/post', array('uniacid' => $_W['account']['uniacid'], 'acid' => $_W['acid']))}" data-toggle="tooltip" data-placement="bottom" title="公众号设置"><i class="wi wi-appsetting"></i></a>
	{/if}
	<a href="{php echo url('account/display')}"  data-toggle="tooltip" data-placement="bottom" title="切换公众号"><i class="wi wi-changing-over"></i></a>
</div>